package com.edu.dao;

import com.edu.entity.User;

public interface UserDao {
    /**
     * 根据id查询用户
     *
     * @param id
     * @return User
     */
    User getByID(int id);

    User getByUsername(String username);

    /**
     * 修改信息
     *
     * @param user
     * @return
     */
    int updateUser(User user);

    /**
     * 添加user
     *
     * @param user
     * @return
     */
    int addUser(User user);

    /**
     * 根据用户名密码查询用户
     *
     * @param username,password
     * @return User
     */
    User getByUsernameAndPassword(String username, String password);
}
